﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/MasterPage.Master" AutoEventWireup="true" CodeBehind="EventSignIn.aspx.cs" Inherits="DrivingCRM.Views.Private.CRM.EventSignIn" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="title" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="banniere" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="nav" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="contenu" runat="server">
    <asp:EntityDataSource ID="DS_EventInscription" runat="server" 
        ConnectionString="name=Model_DrivingCRMContainer" 
        DefaultContainerName="Model_DrivingCRMContainer" EnableFlattening="False" 
        EnableInsert="True" EntitySetName="EventInscriptionSet" 
        EntityTypeFilter="EventInscription">
    </asp:EntityDataSource>
    <h2>Inscription à un évènement de votre Auto-école</h2>
    <table style="width:80%;">
        <tr>
            <td style="width:250px;">Sélectionnez une date de début</td>
            <td>
                <telerik:RadDatePicker ID="RDP_Event" runat="server" OnSelectedDateChanged="RDP_Event_SelectedDateChanged" AutoPostBack="true">
                </telerik:RadDatePicker>
            </td>
        </tr>
        <tr>
            <td style="width:250px;">Sélectionnez une date de fin</td>
            <td>
                <telerik:RadDatePicker ID="RDP_EventEnd" runat="server" OnSelectedDateChanged="RDP_EventEnd_SelectedDateChanged" AutoPostBack="true">
                </telerik:RadDatePicker>
            </td>
        </tr>
        <tr>
            <td style="width:250px;">Evénements disponibles</td>
            <td>
                <asp:DropDownList ID="DDL_Events" runat="server" DataSourceID="DS_Events" 
                    DataTextField="CompleteEvent" DataValueField="IdEvent"></asp:DropDownList>
                
                <asp:EntityDataSource ID="DS_Events" runat="server" 
                    ConnectionString="name=Model_DrivingCRMContainer" 
                    DefaultContainerName="Model_DrivingCRMContainer" EnableFlattening="False" 
                    EntitySetName="EventSet" Where="it.DateWithHour >= @SelectedDate AND it.DateWithHour <= @EndOfDay">
                    <WhereParameters>
                        <asp:ControlParameter DbType="DateTime" Name="SelectedDate" ControlID="RDP_Event" PropertyName="SelectedDate" />
                        <asp:ControlParameter DbType="DateTime" Name="EndOfDay" ControlID="RDP_EventEnd" PropertyName="SelectedDate" />
                    </WhereParameters>
            </asp:EntityDataSource></td>
                     
               
            
        </tr>
        <tr>
            <td style="width:250px;"><asp:Button ID="B_EventSI" runat="server" Text="Sinscrire" OnClick="B_EventSI_Click" /></td>
            <td></td>
        </tr>
        <tr>
            <td colspan="2"><asp:Label ID="L_ErrorMessage" runat="server" ForeColor="Red" /></td>
        </tr>
    </table>
    
    
   
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="footer" runat="server">
</asp:Content>
